#region License Revision: 0 Last Revised: 6/18/2008 11:00 AM
/******************************************************************************
Copyright (c) Microsoft Corporation.  All rights reserved.


This file is licensed under the Microsoft Public License (Ms-PL). A copy of the Ms-PL should accompany this file. 
If it does not, you can obtain a copy from: 

http://www.microsoft.com/resources/sharedsource/licensingbasics/publiclicense.mspx
******************************************************************************/
#endregion // License
using System;
using System.Windows.Browser;
using System.Diagnostics;
using ScriptInterop;

namespace VIEWS // Virtual Earth Wrapper
{

	/// <summary>VE Pixel class.</summary>
	public class VEPixel : JSObject 
	{
		/// <summary>String holding JavaScript class name</summary>
		private static string thisClass = "VEPixel";
		
		/// <summary>Get the JavaScript class name</summary>
		/// <returns type="String">The class name used in JavaScript </returns>		
		public override string ClassName
		{
			get { return thisClass; }
		}

		/// <summary>Construct a C# wrapper from a ScriptObject</summary>
		/// <param name="so">A ScriptObjet from JScript.</param>
		public VEPixel(ScriptObject so) : base(so) { }

		/// <summary>Initializes a new instance of the VEPixel object.</summary>
		/// <param name="x" type="Number">The pixel's x coordinate.</param>
		/// <param name="y" type="Number">The pixel's y coordinate.</param>
		public VEPixel(int x, int y)
		{	// Init to somewhere in Kirkland
			ScriptObject = CreateClass(x, y);
		}

		/// <summary type="Number">Gets or sets the pixel's x coordinate.</summary>
		public int X
		{
			get { return GetProperty<int>("x");}
			set { SetProperty("x", value); }
		}
		/// <summary type="Number">Gets or sets the pixel's y coordinate.</summary>
		public int Y
		{
			get { return GetProperty<int>("y");}
			set { SetProperty("y", value); }
		}
	}
}
